/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package adsreis.com.Controls;

import Competente.Orcamentos;
import adsreis.com.Beans.OrcamentosBean;
import java.awt.Color;
import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Currency;
import java.util.GregorianCalendar;
import java.util.List;

/**
 *
 * @author Pauroenriki
 */
public class VerificarData {
    Date verificardata;
    List<OrcamentosBean> orcamentospendentes1 = new ArrayList<>();
    
    
    
    
    public boolean verificarData(Date dat){
       Orcamentos o = null;
     OrcamentosControl oc = new OrcamentosControl();
    //Orcamentos o = Orcamentos();    
    
    //orcamentospendentes1 = o.orcamentospendentes;
    
    java.util.Date d = new java.util.Date();  
  
//Calendar calendar = new GregorianCalendar();  
//Date d = new Date();



 verificardata = dat;


    //calendar.setTime(d);
               int datav = 0;
               
             
               if(verificardata.equals(d)){
            datav = 1;
        }else if (verificardata.before(d)){
            datav = 2;
                   
        }else if (verificardata.after(d)){
            datav = 3;
        }
        //Date compararvencimento = new Date(System.currentTimeMillis());
        
        switch (datav){
            
            case 1:  
                dat = null;
                verificardata = null;
                return false;
           
            case 2:
                 
                dat = null;
                verificardata = null;
            return true;
                
            case 3: 
                
                dat = null;
                verificardata = null;
            return false;
           
        }
        
   
        
     return false;   
    
}
    
   
    
}
